import { defineStore } from 'pinia'
const key = '_lang'

// 定义 Store
export const useMemberStore = defineStore('_lang', {
  state: () => {
    return {
      lang: window.localStorage.getItem(key) || 'en'
    }
  },
  actions: {
    setLang(val: string) {
      this.lang = val
      window.localStorage.setItem(key, val)
    }
  }
})
